#include <iostream>
#include <cstdio>
#include <unistd.h>
#include <cstring>
int main(int argc, char *argv[], char *env[])
{
    std::cout << "hello C++, My Pid Is: " << getpid() << std::endl;
  
    (void) env;
    for(int i = 0; i < argc; i++)
    {
        printf("argv[%d]: %s\n", i, argv[i]);
    }

    if(strcmp(argv[1],"-a")==0)
    {
      std::cout<<"这是任务a"<<std::endl;
    }
    
    printf("\n");
    for(int i = 0; env[i]; i++)
    {
      printf("env[%d]: %s\n", i, env[i]);
    }
      
      return 0;
}

